#include "formaclass.h"
#include "ui_formaclass.h"
#include<QSqlDatabase>
#include<QSqlQueryModel>
#include<QMessageBox>

Formaclass::Formaclass(QWidget *parent) :
    QWidget(parent),
    ui(new Ui::Formaclass)
{
    ui->setupUi(this);
}

Formaclass::~Formaclass()
{
    delete ui;
}
//void Formaclass::Windowshow(QString classid,QString checkintime)
//{
//    QSqlQueryModel *model = new QSqlQueryModel(ui->tableWidget_checkin);
//    ui->lineEdit_checkin_classid->text() = classid;
//     model->setQuery(QString("select * from CheckinInfoTable where"
//                             " Classid = "+classid+" and CheckinTime = "+checkintime+";"));
//    //列名
//    model->setHeaderData(0, Qt::Horizontal, tr("XID"));
//    model->setHeaderData(1, Qt::Horizontal, tr("ScienceID"));
//    model->setHeaderData(2, Qt::Horizontal, tr("teacherId"));
//    model->setHeaderData(3, Qt::Horizontal, tr("Classid"));
//    model->setHeaderData(4, Qt::Horizontal, tr("RoomID"));
//    model->setHeaderData(6, Qt::Horizontal, tr("xuehao"));
//    model->setHeaderData(5, Qt::Horizontal, tr("CheckinTime"));

//    ui->tableWidget_checkin->setModel(model);//数据放置进去
//    ui->tableWidget_checkin->verticalHeader()->hide();//不显示序号
//}
